package 复合模式;

/**
 * @author zzs
 * @ClassName OneDuckFactory.java
 * @Description
 * @createTime 2022年05月21日 10:23:00
 */
public class OneDuckFactory implements DuckFactory{
    @Override
    public Duck createdDuck() {
        return new OneDuck();
    }

    @Override
    public Duck createdDuckCount() {
        OneDuck oneDuck = new OneDuck();
        return new DuckQuackCount(oneDuck);
    }

    @Override
    public Duck createdDuckObserver(Observable observable) {
        return new OneDuck(observable);
    }
}
